﻿@model KL.Store.Web.Models.ProductModel
@using KL.Store.Core
@using KL.Store.Core.Domain;
<table>
    <tr>
        <td style="width: 35%; vertical-align: top;">
            <img src="@(Parameters.WebSiteImageUrl)/product-large/@(Model.ProductId)_1.jpg" width="275" />
        </td>
        <td style="width: 65%; vertical-align: top;">
            <h1 itemprop="name">@Model.ProductName</h1>
            <div class="product-code">Ürün Kodu : @Model.ProductCode</div>
            @{Html.RenderAction("ProductPrices", "Product", new { id = Model.ProductId });}
        </td>
    </tr>
    <tr>
        <td colspan="2">
            <h3 class="product-details-title">Ürün Açıklaması</h3>
            <div class="tab-inner-tda">
                <div>
                    <div class="std">@Html.Raw(Model.Description.Replace(Environment.NewLine, "<br />"))
                        <br />
                        <br />
                        @Html.Raw(Model.Information)
                    </div>
                </div>
            </div>
            @*<h3 class="product-details-title">Taksit Seçenekleri</h3>
            <div class="tab-inner-tda">
                @if (Model.IsActive)
                {
                    <div>
                        <ul class="product-details-installments">
                            @foreach (var item in Model.PosList)
                            {   
                                <li class="col-xs-6 col-sm-6 col-md-4 col-lg-3">
                                    <table class="installment-table">
                                        <thead>
                                            <tr class="installment-head-bg">
                                                <td colspan="4" style="height: 68px; background: url('/Images/@Parameters.Theme/bank/logo-big/@{@item.PosId}.png') no-repeat 0 100% #FFFFFF;"></td>
                                            </tr>
                                            @if (!string.IsNullOrEmpty(item.Description))
                                            {
                                                <tr class="installment-warning">
                                                    <td style="text-align: center" class="installment" colspan="4">@Html.Raw(item.Description)</td>
                                                </tr>
                                            }
                                            <tr class="installment-Titles" style="background: url('/Images/@Parameters.Theme/bank/head-bg/@{@item.PosId}.png'); color: #FFFFFF;">
                                                <td style="width: 110px" class="groupheader">Taksit</td>
                                                <td style="width: 100px" class="groupheader">Artı Taksit</td>
                                                <td style="width: 140px" class="groupheader">Taksit Tutarı</td>
                                                <td style="width: 140px" class="groupheader">Toplam Tutar</td>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            @foreach (var pi in item.PosInstallment)
                                            {
                                                <tr>
                                                    <td class="installment">
                                                        @pi.InstallmentNumber
                                                    </td>
                                                    <td class="installmentAdd">
                                                        @if (pi.AdditionInstallment > 0)
                                                        {
                                                            <text>+ @pi.AdditionInstallment.ToString()</text>
                                                        }
                                                    </td>
                                                    <td class="price">
                                                        @((((pi.InstallmentNumber == 1 ? Model.CreditCardPrice : Model.PriceWithTax) * pi.CommissionRate) / pi.TotalInstallment).ToString("###,###,##0.00"))
                                                    </td>
                                                    <td class="price">
                                                        @(((pi.InstallmentNumber == 1 ? Model.CreditCardPrice : Model.PriceWithTax) * pi.CommissionRate).ToString("###,###,##0.00"))
                                                    </td>
                                                </tr>
                                            }
                                        </tbody>
                                    </table>
                                </li>
                            }
                        </ul>
                    </div>
                }
                else
                {
                    <text>Ürün geçici olarak temin edilememektedir!</text>
                }
                <div class="clearfix"></div>
            </div>*@
        </td>
    </tr>
</table>


@if (Parameters.WebSiteTrackingCode != "")
{ 
    <script type="text/javascript">

        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', '@Parameters.WebSiteTrackingCode']);
        _gaq.push(['_setDomainName', '@Parameters.WebSiteTrackingDomainName']);
        _gaq.push(['_setAllowLinker', true]);
        _gaq.push(['_trackPageview']);

        (function ()
        {
            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
        })();

    </script>
}